package com.ficus.road.maintain.dao;

import com.ficus.road.maintain.core.dao.BaseMongoDao;
import com.ficus.road.maintain.core.model.zh.OperationSign;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author xiawen yang
 * @date 2022/4/2 下午1:39
 */
@Component
public class OperationSignDao extends BaseMongoDao<OperationSign, String> {
    @Override
    public String getCollectionName() {
        return "zh_operation_sign";
    }

    public OperationSign findLastOne(){
        return findOne(new Query().with(Sort.by(Sort.Order.desc("create_time"))));
    }
}
